import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 密码登录（三次机会）
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-17  22:03
 */
public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 3;
        while(count != 0) {
            System.out.println("请输入密码，你还有"+count+"次机会！");
            String pass = scanner.nextLine();
            if(pass.equals("7513")) {
                System.out.println("登录成功！");
                break;
            }else {
                count--;
            }
        }
        scanner.close();
    }
}
